@echo off
echo Building Image-CSharp...

:: 还原NuGet包
echo Restoring NuGet packages...
dotnet restore

:: 构建解决方案
echo Building solution...
dotnet build --configuration Release

:: 检查构建结果
if %errorlevel% neq 0 (
    echo Build failed!
    exit /b %errorlevel%
)

echo Build completed successfully!
echo.
echo To run the application, execute:
echo dotnet run --project Image-CSharp/Image-CSharp.csproj
echo.
pause